import request from './apiConfig'
const base_url = '/stations'
/**
 * 列出岗位
 * @param {*} query 
 */
export function listStationApi(query) {
    return request({
        url: base_url,
        method: 'GET',
        params: query,
    })
}
/**
 * 增加岗位
 * @param {*} sta 
 */
export function insertStaApi(sta) {
    return request({
        url: base_url,
        method: 'POST',
        data: sta
    })
}

/**
 * 修改部门信息
 * @param {*} sta 
 */
export function mdfStaApi(sta){
    return request({
        url:base_url,
        method:'PUT',
        data:sta,
    })
}
/**
 * 根据id删除岗位
 * @param {*} id 
 */
export function delOneStaApi(id) {
    return request({
        url: `${base_url}/${id}`,
        method: 'DELETE',
    })
}

/**
 * option 选项里的岗位列表
 * @param {*} id 
 */
export function listStaBy(id){
    return request({
        url: `${base_url}/${id}`,
        method: 'GET',
    })
}


export function getStationByIdApi(id){
    return request({
        url:`${base_url}/getStation/${id}`,
        method:'GET',

    })
}